package cate.game.role.show.msg;

import cate.common.util.GameResult;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBBlog;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "英雄时装商城购买")
public class HeroSkinMallBuyReq implements MsgInput {
    @NoteField("时装tid")
    public int tid;
    @NoteField("数量")
    public int num;
    @Override
    public void execute(GameBody game, ClientContext cc) {
        GameResult<Void> r = cc.getRole().getShow().heroSkin.mall.buyItem(tid, num);
        game.notice.message(cc.getRole(), r, true);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBBlog.HERO_SKIN_MALL_BUY_REQ;
    }
}
